export const schema = {
    type: "page",
    title: "新建认领项目",
    body: {
        api: "post:/api/claim_project",
        submitText: "",
        type: "form",
        title: "",
        mode: "horizontal",
        actions: [
            {
                type: "button",
                actionType: "submit",
                label: "提交",
                icon: "fa fa-check pull-left",
                level: "primary",
                redirect: "/claim_project"
            }
        ],
        controls: [
            {
                type: "select",
                name: "org_id",
                label: "所属机构",
                source: "/api/org/sug?_=${_}",
                required: true,
                inline: true,
                visibleOn: "!data.query.org_id && !acl.can('skip:select-org')"
            },
            {
                type: "text",
                name: "team_name",
                label: "发布团队",
                required: true
            },
            {
                type: "image",
                label: "团队logo",
                maxSize: 10 * 1024 * 1024,
                // accept: "image/png,image/jpeg",
                desc: '请选择 jpg 或者 png 图片，单个文件请不要超过 10M，建议尺寸比例：（60 x 60）。',
                // desc: '请选择 jpg 或者 png 图片，单个文件请不要超过 1M',
                name: "logo"
            },
            {
                type: "text",
                name: "name",
                label: "项目名称",
                required: true
            },
            {
                type: "text",
                name: "address",
                label: "项目地址",
                required: true
            },
            [
                {
                    label: "项目周期",
                    type: "date",
                    name: "begin",
                    required: true,
                    maxDate: '${end}'
                },

                {
                    label: "到",
                    labelClassName: "w-xxs",
                    type: "date",
                    name: "end",
                    required: true,
                    minDate: '${begin}'
                }
            ],
            {
                type: "image",
                label: "项目封面图",
                maxSize: 10 * 1024 * 1024,
                // accept: "image/png,image/jpeg",
                desc: '请选择 jpg 或者 png 图片，单个文件请不要超过 10M，建议尺寸比例：（750 x 400）。',
                // desc: '请选择 jpg 或者 png 图片，单个文件请不要超过 1M',
                name: "cover"
            },
            {
                type: "image",
                label: "项目 banner 图",
                maxSize: 10 * 1024 * 1024,
                // accept: "image/png,image/jpeg",
                desc: '请选择 jpg 或者 png 图片，单个文件请不要超过 10M，建议尺寸比例：（750 x 440）。',
                // desc: '请选择 jpg 或者 png 图片，单个文件请不要超过 1M',
                name: "banner",
                multiple: true
            },
            {
                label: '上架状态',
                name: 'status',
                type: 'switch'
            },
            [{
                label: "上架时间",
                type: "date",
                name: "publish_time",
                // minDate: 'today',
                // maxDate: '${end}',
                required: true
            }, {type: 'plain'}],
            {
                type: 'rich-text',
                name: 'content',
                required: true,
                label: '项目详情'
            }
        ]
    }
};
